<template>
  <div class="async-router">
    <router-link to="/async-route/one">去往新增的路由</router-link>
    <el-button @click="addRoute">新增一个路由 /async-route/one</el-button>
  </div>
</template>

<script>
import One from "./one.vue";

export default {
  components: {One},
  methods: {
    addRoute() {
      this.$router.addRoute({
        path: '/async-route/one',
        component: One
      })
    }
  }
}
</script>

<style scoped lang="scss">

</style>